From: Kenichi Handa Date: Fri, 17 Jul 2009 01:27:50 +0000 (+0000) Subject: (shuffle): Fix the logic of setting up the cycle. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~11438 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4e2dd58696774c2f18bb08ca81c3e6f93f7ae0b5;p=emacs.git (shuffle): Fix the logic of setting up the cycle. --- diff --git a/src/casetab.c b/src/casetab.c index 423251df317..95fca03584b 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -229,7 +229,6 @@ shuffle (table, c, elt) { if (NATNUMP (elt)) { - Lisp_Object tem = Faref (table, elt); int from, to; if (CONSP (c)) @@ -241,11 +240,11 @@ shuffle (table, c, elt) from = to = XINT (c); for (; from <= to; from++) - if (from != XINT (elt)) - { - Faset (table, elt, make_number (from)); - Faset (table, make_number (from), tem); - } + { + Lisp_Object tem = Faref (table, elt); + Faset (table, elt, make_number (from)); + Faset (table, make_number (from), tem); + } } }